package com.tsintergy.tmosguide.datax.web.base.controller;

import com.tsieframework.core.base.web.BaseResp;
import com.tsieframework.core.base.web.BaseRespBuilder;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping("/cloud")
@Api(value = "SpringCloud服务提供者", tags = "[hero][cloudProvider]")
public class SpringCloudProviderController {

    @Value("${tsie.application-type}")
    private String applicationType;

    @RequestMapping(value = "/sayHello", method = RequestMethod.GET)
    BaseResp<String> sayHello() {
        return BaseRespBuilder.success().setData("你好" + applicationType, String.class).build();
    }
}
